from django.conf.urls import url

from . import views

app_name = 'polls'

urlpatterns = [
    url(r'^$', views.index, name='index'),
    url(r'^test/', views.test),
    url(r'^test_xml/', views.test_xml),
    url(r'^test_json1/', views.test_json1),
    url(r'^sql_query/', views.sql_query),
    url(r'^sql_query2/', views.sql_query2),
    url(r'^(?P<city_id>[0-9]+)/city/$', views.sql_query_test_city),
    url(r'^(?P<task_id>[0-9]+)/update/$', views.sql_update_trx),

    # ex: /polls/5/
    url(r'^(?P<question_id>[0-9]+)/$', views.detail, name='detail'),
    # ex: /polls/5/results/
    url(r'^(?P<question_id>[0-9a-zA-Z]+)/results/$', views.results, name='results'),
    # ex: /polls/5/vote/
    url(r'^(?P<question_id>[0-9]+)/vote/$', views.vote, name='vote'),
]
